<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
  <script src="lib/vue.js"></script>
</head>
<body>
<button>点我</button>
<div id="root">
  <p>{{num}}</p>
</div>
</body>
<script>
  const vm = new Vue({
    el : '#root',
    data:{
      num : 1
    },
  })
  document.querySelector('button').onclick = function (){
    vm.$data.num++;
  }
</script>
</html>